<template>
    <section>
        <Editor id="tinymce" v-model="tinymceHtml" :init="editorInit"></Editor>
            <math :formula="tinymceHtml"></math>
    </section>

</template>

<script>
     import tinymce from 'tinymce/tinymce'
     import 'tinymce/themes/modern/theme'
     import Editor from '@tinymce/tinymce-vue'
     import math from '../math/index'

    export default {
        components: {
             tinymce,
             Editor,
            math
        },
        data() {
            return {
                 editor: null,
                 tinymceHtml: '',
                 editorInit: {
                     language_url: '/static/tinymce/zh_CN.js',
                     language: 'zh_CN',
                    skin_url: '/static/tinymce/skins/lightgray',
                     height: 300,
                     forced_root_block:'',
                     mode : "textareas",
                     theme_advanced_buttons1 : "hr,image",
                 }

            }
        },
        methods: {

        },
        mounted() {
             tinymce.init({});

        },
    };
</script>

<style scoped>

</style>
